Difference Between CHAR and VARCHAR
CHAR and VARCHAR are both string data types in MySQL, but they differ in how they store data and manage memory.
CHAR is a fixed-length data type, while VARCHAR is a variable-length data type.
CHAR pads unused space with spaces, whereas VARCHAR stores only the actual characters.
CHAR is faster for fixed-length data because of predictable storage size.
VARCHAR is more space-efficient for variable-length data.
CHAR can store up to 255 characters, while VARCHAR can store up to 65,535 characters (depending on row size).